package com.intelij.adapter.eums;

import java.util.stream.Stream;

public enum TargetType {
    PROCESS_ON("pos");
    private String extName;

    TargetType(String extName) {
        this.extName = extName;
    }

    public static TargetType getTargetTypeByExt(String extName){
        return Stream.of(TargetType.values()).filter(t -> t.getExtName().equals(extName)).findFirst().orElse(null);
    }
    public static TargetType getTargetTypeByName(String name) {
        return Stream.of(TargetType.values()).filter(t -> t.name().equals(name)).findFirst().orElse(null);
    }
    public String getExtName() {
        return extName;
    }

    public void setExtName(String extName) {
        this.extName = extName;
    }
}
